package xyz.thoughtset.viewer.common.exc.exceptions;

import lombok.Data;
import xyz.thoughtset.viewer.common.exc.entity.ExcInfo;

@Data
public class ExecException extends RuntimeException {
    protected ExcInfo excInfo;


    public ExecException(ExcInfo exc){
        super(exc.getErrMsg());
        this.excInfo = exc;
    }

    public ExecException addApiId(String apiId){
        excInfo.setApiId(apiId);
        return this;
    }
    public ExecException addBlockId(String blockId){
        excInfo.setBlockId(blockId);
        return this;
    }

}
